package sys.interaction;

import sys.person.AbstractPerson;
import sys.person.Volunteer;
import sys.ui.VolunteerMenu;

import java.util.Scanner;

import static sys.interaction.IteracMain.interMain;

public class IteracVolunteer {

    static int select;

    public static void interVolunteer() {

        Scanner input = new Scanner(System.in);
        String id;

        System.out.print("请输入你的学号：");
        id = input.next();

        while (true) {
            VolunteerMenu.display();
            select = input.nextInt();
            switch (select) {
                case 1 : {
                    AbstractPerson.browseEvent();
                    break;
                }

                case 2: {
                    new Volunteer(id).checkMyEvent();
                    break;
                }
                case 0 : {
                    interMain();
                    break;
                }
                default: {
                    System.out.print("请重新输入： ");
                }
            }
        }
    }
}
